package main

import (
	"log"
	"time"

	"github.com/astaxie/beego/logs"
)

func main() {
	logs.SetLogFuncCall(true)
	logs.SetLogger(logs.AdapterConsole)

	logs.SetLogger("conn", `{"net":"tcp","addr":":7020","reconnectOnMsg":true}`)
	logs.SetLogger("file", `{"filename":"logs/`+`a.log","maxsize"  : 307200,"daily" : true}`)
	log.SetFlags(log.Lshortfile)
	logs.SetPrefix("[magus]")
	logs.SetLevel(logs.LevelInfo)
	logs.SetLogFuncCallDepth(3)
	for {
		logs.Info("djaskdjk sajdksjdk")
		time.Sleep(time.Second * 5)
	}

	//log := NewLogger(1000)
	//log.SetLogger("conn", `{"net":"tcp","addr":":7020"}`)
	//log.Informational("informational")

}
